<?php
/*
 +----------------------------------------------------------------------
 + Title        : Test 控制器
 + Author       : Randy_chen
 + Version      : V1.0.0.1
 + Initial-Time : 2019/5/30 23:35
 + Last-time    : 2019/5/30 23:35+ 86187
 + Desc         : Test
 +----------------------------------------------------------------------
*/


namespace app\admin\behavior;


use app\common\lib\Job;
use library\tools\Node;
use think\Request;
use think\Response;
use think\facade\Log;

class Log2
{
    public function run($param1 )
    {
        try {
            db('logs')->insert([
                                   'create_time' => date('Y-m-d H:i:s'),
                                   'content' =>  json_encode($param1, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES),
                               ]);
        } catch (\Exception $e) {
            \think\facade\Log::write('日志写入失败'.$e->getMessage() , 'info');
        }
        return true;
//        $job = new Job();
//        //事件推送
//        $res = $job->actionWithJob(
//            'log_level',
//            'log_level',
//            [$param1 , $param2]
//        );
    }



}